import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import nightwatchPlugin from 'vite-plugin-nightwatch'

// https://vitejs.dev/config/
export default defineConfig({
  optimizeDeps: {
    exclude: ['vue']
  },
  server: {
    host: '0.0.0.0',
    port: 8888, 
  },
  plugins: [
    vue(),
    nightwatchPlugin({
      renderPage: './nightwatch/index.html'
    }),
  ],
  build: {
    outDir: "flyrush",
  },
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  }
})
